﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Visa.DB;

namespace VisaApp.Models
{
    public class MenuTinModel
    {
        public int Id { get; set; }
        public string Name { get; set; }
        public Nullable<System.DateTime> Datecreate { get; set; }
        public Nullable<bool> Active { get; set; }
        public string MetaKeywords { get; set; }
        public string MetaDescription { get; set; }
        public string MetaTitle { get; set; }
        public Nullable<bool> AlowHome { get; set; }
        public Nullable<int> ParentId { get; set; }


        public static void MapFrom(MenuTinModel Model, ref MenuTin entity)
        {
            entity.Id = Model.Id;
            entity.Name = Model.Name;
            entity.Active = Model.Active;
            entity.Datecreate = Model.Datecreate;
            entity.MetaDescription = Model.MetaDescription;
            entity.MetaTitle = Model.MetaTitle;
            entity.MetaKeywords = Model.MetaKeywords;
            entity.ParentId = Model.ParentId;
            entity.AlowHome = Model.AlowHome;
        }

        public static void MapFrom(MenuTin entity, ref MenuTinModel Model)
        {
            Model.Id = entity.Id;
            Model.Name = entity.Name;
            Model.Active = entity.Active;
            Model.Datecreate = entity.Datecreate;
            Model.MetaDescription = entity.MetaDescription;
            Model.MetaTitle = entity.MetaTitle;
            Model.MetaKeywords = entity.MetaKeywords;
            Model.AlowHome = entity.AlowHome;
            Model.ParentId = entity.ParentId;
        }
    }
}